package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.system.pojo.SysRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface SysRoleMapper extends BaseMapper<SysRole> {
    @Select("SELECT r.* FROM sys_company_user_role cur INNER JOIN sys_role r ON cur.`role_id` = r.`id` WHERE cur.`company_user_id`=#{companyUserId};")
    List<SysRole> queryRoleByCompanyUserId(Long companyUserId);

}
